import type { IForm } from "/@/base-ui/form/types";

export const modalConfig: IForm = {
  formItems: [
    {
      field: "paymentTime",
      type: "datepicker",
      label: "付款时间",
      labelWidth: "110px",
      placeholder: "请选择",
      otherOptions: {
        required: true
      },
      childrenProps: {
        type: "date"
      }
    },
    {
      field: "paymentAmount",
      label: "付款金额（元）",
      type: "inputNumber",
      placeholder: "请输入",
      otherOptions: {
        required: true
      },
      childrenProps: {
        controls: false,
        style: {
          width: "100%"
        }
      }
    },
    {
      field: "note",
      label: "备注",
      type: "input",
      placeholder: "请输入",
      childrenProps: {
        type: "textarea"
      }
    }
  ],
  rules: {
    paymentTime: [
      { required: true, message: "请选择付款时间", trigger: ["blur", "change"] }
    ],
    paymentAmount: [
      { required: true, message: "请输入付款金额", trigger: ["blur", "change"] }
    ]
  },
  colLayout: {
    span: 24
  },
  labelWidth: "122px",
  itemStyle: {}
};
